'use client'
// 模版不会像布局layout那样维持状态
import { useState } from 'react'
import type { ReactNode } from 'react'

export default function Template({ children }: { children: ReactNode}) {
  const [count, setCount] = useState(0)
  return (
    <>
      <h1>Template {count}</h1>
      <button onClick={() => setCount(count + 1)}>
        Increment
      </button>
      {children}
    </>
  )
}
